package com.gzsxy.esjy.service.order.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gzsxy.esjy.service.base.dto.request.ApiOrderRequest;
import com.gzsxy.esjy.service.base.dto.response.OrderCountRsp;
import com.gzsxy.esjy.service.base.dto.response.OrderRsp;
import com.gzsxy.esjy.service.base.util.Page;
import com.gzsxy.esjy.service.order.entity.Order;
import com.gzsxy.esjy.service.order.entity.vo.OrderQueryVo;

import java.util.List;

/**
 * @author xiaolong
 * @version 1.0
 * @description: 订单
 * @date 2022/2/17 17:46
 */
public interface OrderService extends IService<Order> {

    /**
     * @description: 分页查询订单
     * @param
     * @return
     */
    IPage<OrderRsp> getPageVo(Page<?> page, OrderQueryVo orderQueryVo);

    /**
     * @description: 改变订单状态
     * @param
     * @return
     */
    void eidtStatus(String orderId, Integer status);

    /**
     * @description: 删除订单
     * @param  id 订单id
     * @return
     */
    void deleteOrder(String id);

    /**
     * @description: 添加订单
     * @param
     * @return
     */
    List<String>  addOrder(ApiOrderRequest apiOrderRequest);

    /**
     * @description: 查询当前订单列表各个状态的数量
     * @param
     * @return
     */
    OrderCountRsp getStatusCount();

    /**
     * @description:   根据前台用户id获取订单列表
     * @param
     * @param page
     * @return
     */
    IPage<OrderRsp> getOrderByUserId(Page<?> page, OrderQueryVo orderQueryVo);

    /**
     * @description: 订单统计
     * @param
     * @return
     */
    List<OrderCountRsp> getOrderStatistical(String day);
}
